﻿// not used

namespace Wizard.Entities
{
    internal interface IEntity
    {
        string EntityType { get; set; }
        string EntityRef { get; set; }
        // when the EntityType/EntityRef is not globally unique.
        // Then it should the Entity must have an Owner
        IEntity Owner { get; }

        //IPropertyDefinition[] GetProperties { get; }
        //IPropertyDefinition PropertyDefinition(string name);
        //object GetPropertyValue(IPropertyDefinition Field);
        //void SetPropertyValue(IPropertyDefinition entity, object value);
    }

    public static class EntityTypes
    {
        static private System.Collections.Generic.Dictionary<string, EntityType> mTypes;

        static EntityTypes()
        {
            mTypes = new System.Collections.Generic.Dictionary<string, EntityType>(System.StringComparer.OrdinalIgnoreCase);
        }

        static void RegisterType(string shortCode, string friendlyName)
        {
            mTypes.Add(shortCode, new EntityType(shortCode, friendlyName));
        }

    }
}
namespace Wizard
{
    public class EntityType
    {
        public readonly string Code;
        public readonly string FriendlyName;

        public EntityType(string code, string friendlyName)
        {
            this.Code = code;
            this.FriendlyName = friendlyName;
        }
    }
}